Skip to content

Support for Python 3.14#4303

Open
valeriupredoi wants to merge 44 commits into
mainfrom
python3.14
Open

Support for Python 3.14#4303
valeriupredoi wants to merge 44 commits into
mainfrom
python3.14

Conversation

@valeriupredoi
Copy link
Copy Markdown
Contributor

@valeriupredoi valeriupredoi commented Jan 5, 2026

Description

ESMValCore supports Python 3.14 via ESMValGroup/ESMValCore#2850

Initial hurdle was pys2index, see conda-forge/pys2index-feedstock#31 but there are quite a few more deps that need looking into, unfortunately https://github.com/ESMValGroup/ESMValTool/actions/runs/20717475462/job/59472088226?pr=4303 at least with cdo=2.5.4 in the pipes conda-forge/cdo-feedstock#172

Also keep an eye on Matplotlib's feedstock https://github.com/conda-forge/matplotlib-feedstock/pulls

Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

@valeriupredoi
Copy link
Copy Markdown
Contributor Author

@bouweandela all done the Pixi work here - as expected, pys2index is not playing ball, but there are ways we can replace it (I really don't want to spend the work to rebuild it with the new abseil TBF); one alternative is sklearn - @schlunma likes that lib:

from sklearn.neighbors import BallTree
import numpy as np

points = np.radians([
    [51.5074, -0.1278],  # London
    [48.8566, 2.3522],   # Paris
])

tree = BallTree(points, metric='haversine')

query = np.radians([[51.5, -0.1]])

dist, ind = tree.query(query, k=1)
print(ind)

I suggest we mark that cmorizer Not Working until we find a replacement for pys2index, and skip the test here, so we can crack on with support for Python 3.14? 🍺

@schlunma
Copy link
Copy Markdown
Contributor

as expected, pys2index is not playing ball, but there are ways we can replace it (I really don't want to spend the work to rebuild it with the new abseil TBF)

We might also be able to replace this with our existing unstructured regridding features, which have grown really powerful.

I suggest we mark that cmorizer Not Working until we find a replacement for pys2index, and skip the test here, so we can crack on with support for Python 3.14? 🍺

Agreed. We should definitely not postpone Python 3.14 any longer because of a single CMORizer. If we want to be super thorough, we could provide a pixi environment that includes pys2index for users that need to run this CMORizer (that pulls in Python 3.13).

@valeriupredoi
Copy link
Copy Markdown
Contributor Author

thanks @schlunma 🍺 I'll crack on here with an Xfail on that test and a mention in the docs; TBF I think having a separate Pixi env just for that cmorizer may be overkill, but then again am also quite new to Pixi mentality - @bouweandela what you reckon?

@valeriupredoi valeriupredoi marked this pull request as ready for review May 29, 2026 12:20
@valeriupredoi valeriupredoi requested a review from a team as a code owner May 29, 2026 12:20
Comment thread pyproject.toml
"progressbar2",
"pyproj>=2.1",
"pys2index",
# "pys2index",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we put this dependency in a feature and add that feature to the Python 3.12 and 3.13 envs only? Like that it will still work if you use a development installation with one of those.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhm that's a good idea!

@bouweandela
Copy link
Copy Markdown
Member

It would be nice to at least open an issue about replacing pys2index with the proposed steps to do so, if we plan to do that.

The problem seems to be that the main dependency of pys2index, s2geometry needs a rather specific version of abseil conda-forge/s2geometry-feedstock#35 (comment), but abseil is globally pinned on conda-forge so it may not be possible to build s2geometry at all with the most recent conda-forge global pins. A possible solution would be to try static linking instead.

@valeriupredoi
Copy link
Copy Markdown
Contributor Author

It would be nice to at least open an issue about replacing pys2index with the proposed steps to do so, if we plan to do that.

The problem seems to be that the main dependency of pys2index, s2geometry needs a rather specific version of abseil conda-forge/s2geometry-feedstock#35 (comment), but abseil is globally pinned on conda-forge so it may not be possible to build s2geometry at all with the most recent conda-forge global pins. A possible solution would be to try static linking instead.

given how poorly maintained pys2index (so the top stack) is I doubt we should pay any effort, buds - unless we take over its maintenance, but frankly, am not keen on that, am already maintaining too many packages that I can afford 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants